"; echo ""; ?> "; echo "Error!!!"; echo ""; echo ""; echo ""; echo "

"; echo "You are not logged in
"; echo "Or Your session has been expired

"; echo "Login"; echo "

"; echo ""; echo ""; exit(); } $uid = getuid_sid($sid); if(isbanned($uid)) { echo ""; echo "Error!!!"; echo ""; echo ""; echo ""; echo "

"; echo "\"x\"/
"; echo "You are Banned

"; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Time Left: $rmsg
"; $nick = getnick_uid($banto[2]); echo "By: $nick
"; echo "Reason: $banto[1]"; //echo "Login"; echo "

"; echo ""; echo ""; exit(); } echo ""; echo "Chat Bot"; echo ""; echo ""; echo ""; echo "

"; echo "
"; addonline(getuid_sid($sid),"Chatting to ChatGirl",""); if ($input!="") { $sendData = "botid=".$botid."&input=".urlencode($input)."&custid=".$custid; // Send the request to Pandorabot $result = PostToHost($hostname, $hostpath, $sendData); //TODO: Process the returned XML as an XML document instead of a big string. // Use string manipulations to pull out the 'custid' and 'that' values. $pos = strpos($result, "custid=\""); // Extract the custid if ($pos === false) { $custid = ""; } else { $pos += 8; $endpos = strpos($result, "\"", $pos); $custid = substr($result, $pos, $endpos - $pos); } // Extrat - this is the reply from the Pandorabot $pos = strpos($result, ""); if ($pos === false) { $reply = ""; } else { $pos += 6; $endpos = strpos($result, "", $pos); $reply = unhtmlspecialchars(substr($result, $pos, $endpos - $pos)); } //echo htmlspecialchars( $reply); $hers = $reply; $hers = parsemsg($hers); $input=htmlspecialchars($input); $nick = getnick_uid($uid); echo "
$nick: $input
"; echo "Chat Bot: $hers
"; echo "

"; echo "


"; echo "

"; }else{ echo "Hello, now you can chat with our chatbot
her name is BRITTNEY, have fun
"; echo "
"; echo "


"; echo "

"; } echo "

0 \"\"/Home
"; echo "

"; echo ""; function unhtmlspecialchars( $string ) { $string = str_replace ( '&', '&', $string ); $string = str_replace ( ''', '\'', $string ); $string = str_replace ( '"', '"', $string ); $string = str_replace ( '<', '<', $string ); $string = str_replace ( '>', '>', $string ); $string = str_replace ( 'ü', '?', $string ); $string = str_replace ( 'Ü', '?', $string ); $string = str_replace ( 'ä', '?', $string ); $string = str_replace ( 'Ä', '?', $string ); $string = str_replace ( 'ö', '?', $string ); $string = str_replace ( 'Ö', '?', $string ); return $string; } ?>